<!DOCTYPE html>
<html>
<head>
    <title>$app.topic 客户信息</title>
    #parse("/inc/meta.htm")
</head>
<body id="inner_page_start">

<div class="modal fade" id="ex-back-big" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <form action="/system/bannerInfo" type="post">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title h4" id="myExtraLargeModalLabel">⚠️信息确认</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                </div>
                <div class="modal-body">
                    <p>确认身份证信息与填写信息匹配，资质图片无误，昵称，头像等无违规，确认请选择通过，否则不通过！</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="button" onclick="stateCheck('$!respData.id',1)" class="btn btn-info" >通过</button>
                    <button type="button" onclick="stateCheck('$!respData.id',2)" class="btn btn-danger" >不通过</button>
                </div>
            </div>
        </form>
    </div>
</div>

#parse("/inc/header.htm")
<div id="wrapper">
    #parse("/inc/menu.htm")
    <div id="content-wrapper">
        <div class="container-fluid">
            <!-- 面包屑-->
            <ol class="breadcrumb">
                <li class="breadcrumb-item">
                    用户管理
                </li>
                <li class="breadcrumb-item active">用户信息</li>
            </ol>
        </div>
        <!-- /.container-fluid -->
        <div class="container-fluid">
                <input type="hidden" value="$!respData.id" name="id" />
                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">姓名</label>
                    <div class="col-sm-6 add-padding">
                        $!respData.name
                    </div>
                    <div class="col-sm-2"></div>
                </div>
                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">昵称</label>
                    <div class="col-sm-6 add-padding">
                        $!respData.nick
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">手机号码</label>
                    <div class="col-sm-6 add-padding">
                        $!respData.tel
                    </div>
                    <div class="col-sm-2"></div>
                </div>

            <div class="form-group row">
                <div class="col-sm-2"></div>
                <label class="col-sm-2 col-form-label">总购买量</label>
                <div class="col-sm-6 add-padding">
                    $!respData.allnum
                </div>
                <div class="col-sm-2"></div>
            </div>
            <div class="form-group row">
                <div class="col-sm-2"></div>
                <label class="col-sm-2 col-form-label">申请退款量</label>
                <div class="col-sm-6 add-padding">
                    $!respData.fdnum
                </div>
                <div class="col-sm-2"></div>
            </div>
            <div class="form-group row">
                <div class="col-sm-2"></div>
                <label class="col-sm-2 col-form-label">同意退款量</label>
                <div class="col-sm-6 add-padding">
                    $!respData.renum
                </div>
                <div class="col-sm-2"></div>
            </div>
            <div class="form-group row">
                <div class="col-sm-2"></div>
                <label class="col-sm-2 col-form-label">余额</label>
                <div class="col-sm-6 add-padding">
                    $!respData.money
                </div>
                <div class="col-sm-2"></div>
            </div>

            <div class="form-group row">
                <div class="col-sm-2"></div>
                <label class="col-sm-2 col-form-label">积分</label>
                <div class="col-sm-6 add-padding">
                    $!respData.score
                </div>
                <div class="col-sm-2"></div>
            </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">状态:</label>
                    <div class="col-sm-6 add-padding">
                        #if($!respData.state == 0) 正常
                        #elseif($!respData.state == 1) 封号
                        #else 未知 #end
                    </div>
                </div>
                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">审核状态</label>
                    <div class="col-sm-6 add-padding">
                        #if($!respData.check == -1) 无审核信息
                        #elseif($!respData.check == 0) 待审核
                        #elseif($!respData.check == 1) 审核通过
                        #elseif($!respData.check == 2) 审核不通过
                        #else 未知 #end
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">身份证</label>
                    <div class="col-sm-6 add-padding">
                        $!respData.idcard
                    </div>
                    <div class="col-sm-2"></div>
                </div>
                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">城市</label>
                    <div class="col-sm-6 add-padding">
                        $!respData.city
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">身份证照</label>
                    <div class="col-sm-8 add-padding">
                        #foreach($!imgpath in $!respData.idimgs.split(","))
                            <img src="$!app.staticUrl$!imgpath" style="max-width: 300px;max-height: 200px;" />
                        #end
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">机构类型</label>
                    <div class="col-sm-6 add-padding">
                        $!{tagInfo["19"]["$!respData.atype"].name}
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">机构名称</label>
                    <div class="col-sm-6 add-padding">
                        $!respData.agency
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">所在部门</label>
                    <div class="col-sm-6 add-padding">
                        $!respData.department
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">机构认证图片</label>
                    <div class="col-sm-6 add-padding">
                        #foreach($!imgpath in $!respData.imgs.split(","))
                        <img src="$!app.staticUrl$!imgpath" style="max-width: 300px;max-height: 200px;" />
                        #end
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">头像</label>
                    <div class="col-sm-6 add-padding">
                        <img src="$!app.staticUrl$!respData.icon" style="max-width: 200px;max-height: 200px;" />
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">注册时间</label>
                    <div class="col-sm-6 add-padding">
                        $!respData.ctime
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">邀请人</label>
                    <div class="col-sm-6 add-padding">
                        #if($respData.inviteid != 0)
                        <a href="/suser/user?id=$!respData.inviteid"> [$!respData.fname] </a>
                        #else
                            无
                        #end
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-4"></div>
                    <div class="col-sm-2">
                        <button type="button" onclick="window.history.back()" class="btn btn-dark">返回</button>
                    </div>
                    <div class="col-sm-2">
                        #if($!respData.check == 0)
                        <button type="button" class="btn btn-primary" data-toggle="modal"
                                data-target="#ex-back-big" >审核</button>
                        #end
                    </div>
                </div>
        </div>
        #parse("/inc/copyright.htm")
    </div>
    <!-- /.content-wrapper -->
</div>
#parse("/inc/footer.htm")
<script>
    //
    function stateCheck(rid,state) {
        $.ajax({
            url:'/suser/check',
            method:'post',
            data:{id:rid,state:state},
            success:function (res) {
                if(res.state == '000'){
                    window.location.href = "/suser/page"
                }
                else{
                    alert("服务异常")
                }
            },
            error:function (obj, ex, msg) {
                alert("网络异常")
            }
        })
    }
</script>
</body>
</html>